#include "menuwindow.h"
#include "ui_menuwindow.h"

MenuWindow::MenuWindow(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::MenuWindow)
{
    ui->setupUi(this);
}

MenuWindow::~MenuWindow()
{
    delete ui;
}

void MenuWindow::on_subButton_clicked()
{
    int num = ui->lineEdit->text().toInt();
    if(num == 0)
        return;
    num--;
    ui->lineEdit->setText(QString::number(num));
}

void MenuWindow::on_addButton_clicked()
{
    int num = ui->lineEdit->text().toInt();
    num++;
    ui->lineEdit->setText(QString::number(num));
}
